import React from 'react';
import { Switch, Route, Redirect } from 'react-router-dom';
// import asyncImportComponent from '@/components/AsyncImportComponent';
import UserInfo from '@/containers/UserInfo';
import PageNotFound from '@/containers/PageNotFound';
// const UserInfo = asyncImportComponent(() => import('@/containers/UserInfo'));
// const PageNotFound = asyncImportComponent(() => import('@/containers/PageNotFound'));


const Routes = () => (
  <Switch>
    <Route path="/" exact component={UserInfo} />
    <Route path="/404" component={PageNotFound} />
    <Redirect from="*" to="/404" />
  </Switch>
);

export default Routes;
